import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class test1 {
    public static void main(String[] args) throws IOException {
        try(InputStream inputstream = new FileInputStream("./test.txt")){
            while(true){
                byte[] data = new byte[2024];
                int n = inputstream.read(data);
                System.out.println("n = " + n);
                if (n == -1){
                    break;
                }
                for (int i = 0; i < n; i++) {
                    System.out.printf("%c\n", data[i]);
                }

            }
        }
    }
}
